﻿<div class="form-horizontal" ms-controller="RCTXADD">
    <div class="form-group">
        <label class="col-xs-2 control-label">任务状态</label>
        <div class="col-xs-4">
            <select class="form-control" ms-duplex="modelData.RWStatus">
                <option value="0" ms-attr-checked="modelData.RWStatus==0?'checked':''">正在进行</option>
                <option value="1" ms-attr-checked="modelData.RWStatus==1?'checked':''">已结束</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">任务类型</label>
        <div class="col-xs-4">
            <select class="form-control" ms-duplex="modelData.LeiBie">
                <option>一般</option>
                <option>重要</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">任务内容</label>
        <div class="col-xs-9">
            <textarea class="form-control   szhl_require" rows="5" ms-duplex="modelData.RWTitle"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">任务截至时间</label>
        <div class="col-xs-5">
            <input class="szhl_form_date form-control " ms-duplex="modelData.RWJZDate" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">负责人</label>
        <div class="col-xs-9">
            <input type="text" class="form-control szhl_getPeoples" signle="Y" ms-duplex="modelData.RWFZR" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">参与人</label>
        <div class="col-xs-9">
            <input type="text" class="form-control szhl_getPeoples" ms-duplex="modelData.RWCYR">
        </div>
    </div>
</div>
<script>
    var strId = ComFunJS.getQueryString("ID");
    var model = avalon.define({
        $id: "RCTXADD",
        modelData: { "RWStatus": "0", "LeiBie": "一般", "RWTitle": "", "RWJZDate": "", "RWFZR": ComFunJS.getnowuser(), "RWCYR": "" }
    });
    function getdata() {
        var modelValue = JSON.stringify(model.modelData.$model);
        return { Action: "ADDRCTX", P1: modelValue };
    }
    avalon.ready(function () {
         
        if (strId != null) {
            $.getJSON('/API/FTAPI.ashx?Action=GETRCTXMODEL', { P1: strId }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    model.modelData = resultData.Result;
                }
            })
        }
    })
</script>